package com.wzxy.wzinfo.entiry;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

@Table(name="news_introduce")
@Entity()
public class NewsIntroduce {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	private String introduce;       //摘要
	private String source;     		//来源
	private String URL;        
	private String title;
	private Integer type;      		//类型/标签
	
	@Lob
	@Type(type="text")
	@Column(name="content",nullable=true)
	private String content;			//文章内容
	
	@Column(name="provide_id",nullable=true)
	private Integer provideId; 		//提供者ID
	@OneToOne(fetch=FetchType.EAGER,targetEntity=User.class)
	@JoinColumn(name="provide_id",insertable=false,unique=false,nullable=true,updatable=false)
	private User provide;      		//提供者
	
	@Column(name="approve_id",nullable=true)
	private Integer approveId; 		//审核者ID
	@OneToOne(fetch=FetchType.EAGER,targetEntity=User.class)
	@JoinColumn(name="approve_id",insertable=false,unique=false,nullable=true,updatable=false)
	private User approve;      		//审核者
	
	@Column(name="approve_remark")
	private String approveRemark;   //审核备注
	private Integer state;     		//状态0，未审核，1已审核,-1已删除
	@Column(name="read_authority")
	private String readAuthority;	//阅读权限
	@Column(name="creation_time")
	private String creationTime;	//提供时间
	@Column(name="approve_time")
	private String approveTime;		//审核时间
	@Column(name="post_time")
	private String postTime;		//文章发布时间
	
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getIntroduce() {
		return introduce;
	}
	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	public String getURL() {
		return URL;
	}
	public void setURL(String uRL) {
		URL = uRL;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public Integer getProvideId() {
		return provideId;
	}
	public void setProvideId(Integer provideId) {
		this.provideId = provideId;
	}
	public User getProvide() {
		return provide;
	}
	public void setProvide(User provide) {
		this.provide = provide;
	}
	public Integer getApproveId() {
		return approveId;
	}
	public void setApproveId(Integer approveId) {
		this.approveId = approveId;
	}
	public User getApprove() {
		return approve;
	}
	public void setApprove(User approve) {
		this.approve = approve;
	}
	public String getApproveRemark() {
		return approveRemark;
	}
	public void setApproveRemark(String approveRemark) {
		this.approveRemark = approveRemark;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public String getReadAuthority() {
		return readAuthority;
	}
	public void setReadAuthority(String readAuthority) {
		this.readAuthority = readAuthority;
	}
	public String getCreationTime() {
		return creationTime;
	}
	public void setCreationTime(String creationTime) {
		this.creationTime = creationTime;
	}
	public String getApproveTime() {
		return approveTime;
	}
	public void setApproveTime(String approveTime) {
		this.approveTime = approveTime;
	}
	public String getPostTime() {
		return postTime;
	}
	public void setPostTime(String postTime) {
		this.postTime = postTime;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
}
